/*
 * Copyright © 2022-now 尛飛俠（Denvie） All rights reserved.
 */

package cn.denvie.springcloud.seata.order.feign;

import cn.denvie.springcloud.seata.common.model.vo.ResultVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * StorageFeignService。
 *
 * @author Denvie
 * @date 2022/4/8
 * @since 1.0.0
 */
@FeignClient(name = "storage-service", path = "/storage")
public interface StorageFeignService {
    /**
     * 扣减商品库存。
     *
     * @param commodityCode 商品编号
     * @param count         扣除数量
     * @return ResultVo
     */
    @RequestMapping(path = "/deduct")
    ResultVo<Void> deduct(@RequestParam("commodityCode") String commodityCode, @RequestParam("count") Integer count);
}
